package com.sghj.SysPermission.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sghj.SysPermission.entity.SysRoleDept;
import com.sghj.SysPermission.mapper.SysRoleDeptMapper;
import com.sghj.SysPermission.service.SysRoleDeptService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 角色和部门关联表 服务实现类
 * </p>
 *
 * @author xrx
 * @since 2023-03-20
 */
@Service
public class SysRoleDeptServiceImpl extends ServiceImpl<SysRoleDeptMapper, SysRoleDept> implements SysRoleDeptService {

    @Override
    public int[] getRoleDeptList(Integer rid) {
        //QueryWrapper<SysRoleDept> wrapper = new QueryWrapper<>();
        //wrapper.eq("role_id",rid);
        //baseMapper.selectList(wrapper);
        int[] deptIds = baseMapper.selectDeptByRoleId(rid);
        return deptIds;
    }
}
